<template>
	<view class="content">
		<image v-bind:class="className" src="/static/logo.png" style="width: 120rpx; height: 120rpx;"></image>
		<text class="title">{{title}}</text>
		<view>
			<view>{{number + 1}}</view>
			<view>{{ok?'YES':'NO'}}</view>
			<view>{{message.split('').reverse().join('')}}</view>
		</view>
		<view v-for="item in arr" style="color: #ff0000;">
			{{item}}
		</view>
		<view v-for="(item,index) in 4" style="color: #00ff00;">
			<view :class="'list-'+index%2">{{index%2}}</view>
		</view>
		<view v-for="(value,name,index) in object">
			{{index}}.{{name}}:{{value}}
		</view>
		<view v-for="item in arr":key="item.id">
			<view style="color: #0000ff;">{{item.id}}:{{item.name}}</view>
		</view>
		<view>
			<view v-if="!raining">今天天气真好</view>
			<view v-if="raining">下雨天，只能在家呆着了</view>
			<view v-if="show==='app'">show的值是app</view>
			<view>Show is {{show?'App':'vue'}}</view>
			<view>
				<view v-if="show==='app'">uni-app</view>
				<view v-else-if="showe==='html'">HTML</view>
				<view v-else>vue</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				arr:[
					{id:1,name:'uni-app'},
					{id:2,name:'HTML'}
				],
				object:{
					title:'How to do lists in Vue',
					author:' Jiang Xinying',
					publishedAt:'2020-04-10'
				},
				title: 'Hello UniApp',
				className: "smalllogo",
				number: 1,
				ok: true,
				message: 'Hello Vue!',
				raining: false,
				show: 'app'

			}
		},
		methods: {

		}
	}
</script>

<style>
	.content {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		min-height: 200rpx;
	}

	.logo {
		height: 200rpx;
		width: 200rpx;
		margin-top: 200rpx;
		margin-left: auto;
		margin-right: auto;
		margin-bottom: 50rpx;
	}

	.smalllogo {
		height: 50rpx;
		width: 50rpx;
		margin-top: 200rpx;
		margin-left: auto;
		margin-right: auto;
		margin-bottom: 50rpx;
	}

	.title {
		color: gainsboro;
	}
</style>